package cn.sofwin.boot.crud.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.beans.factory.annotation.Autowired;
import cn.sofwin.core.mvc.bean.Meta;
import cn.sofwin.core.mvc.annotation.BaseDao;
import cn.sofwin.core.mvc.service.impl.BaseServiceImpl;
import cn.sofwin.boot.crud.entity.MallOrdre;
import cn.sofwin.boot.crud.dao.MallOrdreDao;
import cn.sofwin.boot.crud.service.MallOrdreService;

/**
 * 服务层
 * @author LetCode
 * @since 1.0
 *
 */
@CacheConfig(cacheNames = "mallOrdre")
@Service("mallOrdreService")
public class MallOrdreServiceImpl extends BaseServiceImpl<MallOrdre> implements MallOrdreService {
	
	@BaseDao
	@Autowired
	MallOrdreDao mallOrdreDao;

	@Cacheable
	@Override
	public Meta loadMetaInfo(){
		Meta meta = new Meta("", "mallOrdre");

		// 增加表头字段信息
		meta.addColumn("id", "序号")
		      .addColumn("userId", "用户id")
		      .addColumn("goodId", "商品id")
		      .addColumn("money", "订单金额，单位：分")
		      .addColumn("status", "状态：-1.删除，0.等待支付，1.等待发货，2.等待收货,3.订单完成");

		return meta;
	}

	
}